package nodes;


import compiler.Compiler;
import compiler.SymbolTable;
import compiler.Yytoken;

import descriptors.AbstractDescr;

public class StringNode extends ExpressionNode {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String value;
	
	public StringNode(Yytoken token){
		super(token.line(),token.column());
		this.value=token.value();
	}
	
	@Override
	public AbstractDescr compile(
			SymbolTable symbolTable, Compiler compiler) {
		compiler.write("PUSHS, "+value);
		return null;
	}

	@Override
	public void print() {
		trace("StringNode: "+value);
		unindent();
	}

}
